<?php
namespace slinks\common\util;


class StringUtil {
	
	public static function beginsWith($str, $sub) {
    	return (strncmp($str, $sub, strlen($sub)) == 0);
	}
	
	public static function endsWith( $str, $sub ) {
	   return ( substr( $str, strlen( $str ) - strlen( $sub ) ) === $sub );
	}
	
}